<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>FOREST宠物管理系统后台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <!-- App favicon -->
    <link rel="shortcut icon" href="images/favicon.ico">
    <link rel="stylesheet" type="text/css"
          href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/10.4.0/sweetalert2.min.css "/>
    <!-- third party css -->
    <link href="libs/datatables/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
    <link href="libs/datatables/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
    <link href="libs/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
    <link href="libs/datatables/select.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
    <script src="js/username.js"></script>
    <!-- App css -->
    <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="css/icons.min.css" rel="stylesheet" type="text/css"/>
    <link href="css/app.min.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="css/pop2.css">
    <script src="js/jquery-3.5.1.min.js"></script>
    <style type="text/css">
        #eeeee {
            text-align: center;
        }
        #tops{
            margin-top: 20px;
            width: 800px;
            height: 200px;
        }
        #eeeee input {
            border: 1px #0d0f13 solid;
            margin-left: 40px;
            width: 70px;
            height: 40px;
            color: #4e555b;
            line-height: normal;
            text-align: center;
        }

        #selected {
            width: 200px;
            height: 40px;
            box-shadow: #5a6268;

        }

        #sbody {

        }

        #choiceWindow {
            display: none;
            position: absolute;
            top: 25%;
            left: 45%;
            width: 20%;
            height: 25%;
            padding: 20px;
            border: 3px solid #ccc;
            background-color: white;
            z-index: 2;
            overflow: auto;
            font-size: 25px;
        }

        #backGround {
            display: none;
            position: absolute;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 1100px;
            background-color: black;
            z-index: 1;
            -moz-opacity: 0.8;
            opacity: .80;
            filter: alpha(opacity=88);
        }

        #x:hover {
            cursor: pointer;
            color: rgb(55, 198, 192);
        }

    </style>
    <link rel="stylesheet" href="css/pop.css">
    <script src="js/username.js"></script>
</head>

<body>

<!-- Begin page -->
<div id="wrapper">

    <!-- Topbar Start -->
    <div class="navbar-custom">
        <ul class="list-unstyled topnav-menu float-right mb-0">

            <li class="dropdown d-none d-lg-block">
                <a class="nav-link dropdown-toggle mr-0 waves-effect waves-light" data-toggle="dropdown" href="#"
                   role="button" aria-haspopup="false" aria-expanded="false">
                    <img src="images/flags/us.jpg" alt="user-image" class="mr-1" height="12"> <span
                        class="align-middle">English <i class="mdi mdi-chevron-down"></i> </span>
                </a>
                <div class="dropdown-menu dropdown-menu-right">

                    <!-- item-->
                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                        <img src="images/flags/spain.jpg" alt="user-image" class="mr-1" height="12"> <span
                            class="align-middle">Spanish</span>
                    </a>

                    <!-- item-->
                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                        <img src="images/flags/germany.jpg" alt="user-image" class="mr-1" height="12"> <span
                            class="align-middle">German</span>
                    </a>

                    <!-- item-->
                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                        <img src="images/flags/italy.jpg" alt="user-image" class="mr-1" height="12"> <span
                            class="align-middle">Italian</span>
                    </a>

                    <!-- item-->
                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                        <img src="images/flags/russia.jpg" alt="user-image" class="mr-1" height="12"> <span
                            class="align-middle">Russian</span>
                    </a>

                </div>
            </li>

            <li class="dropdown notification-list">
                <a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#"
                   role="button" aria-haspopup="false" aria-expanded="false">
                    <i class="dripicons-inbox mail-icon"></i>
                    <span class="badge badge-info noti-icon-badge">20</span>
                </a>
                <div class="dropdown-menu dropdown-menu-right dropdown-lg">

                    <!-- item-->
                    <div class="dropdown-item noti-title">
                        <h5 class="m-0">
                                    <span class="float-right">
                                        <a href="" class="text-dark">
                                            <small>Clear All</small>
                                        </a>
                                    </span>20 New Messages
                        </h5>
                    </div>

                    <div class="slimscroll noti-scroll">

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item active">
                            <div class="notify-icon"><img src="images/users/avatar-1.jpg"
                                                          class="img-fluid rounded-circle" alt=""/></div>
                            <p class="notify-details">Sandra Smith
                                <small class="text-muted">Hey ! I'm working on your project</small>
                            </p>
                        </a>

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item">
                            <div class="notify-icon"><img src="images/users/avatar-2.jpg"
                                                          class="img-fluid rounded-circle" alt=""/></div>
                            <p class="notify-details">Amily Lee
                                <small class="text-muted">Hi, How are you? What about our next meeting?</small>
                            </p>
                        </a>

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item">
                            <div class="notify-icon">
                                <img src="images/users/avatar-3.jpg" class="img-fluid rounded-circle" alt=""/></div>
                            <p class="notify-details">David Boos</p>
                            <p class="text-muted mb-0 user-msg">
                                <small>What about our next meeting</small>
                            </p>
                        </a>

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item">
                            <div class="notify-icon"><img src="images/users/avatar-4.jpg"
                                                          class="img-fluid rounded-circle" alt=""/></div>
                            <p class="notify-details">Christopher Palmer
                                <small class="text-muted">Waiting for your Response...</small>
                            </p>
                        </a>

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item">
                            <div class="notify-icon">
                                <img src="images/users/avatar-5.jpg" class="img-fluid rounded-circle" alt=""/></div>
                            <p class="notify-details">Malika Roy</p>
                            <p class="text-muted mb-0 user-msg">
                                <small>Wow that's great</small>
                            </p>
                        </a>
                    </div>

                    <!-- All-->
                    <a href="javascript:void(0);" class="dropdown-item text-center text-primary notify-item notify-all">
                        View all
                        <i class="fi-arrow-right"></i>
                    </a>

                </div>
            </li>

            <li class="dropdown notification-list">
                <a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#"
                   role="button" aria-haspopup="false" aria-expanded="false">
                    <i class="dripicons-bell noti-icon"></i>
                    <span class="badge badge-danger noti-icon-badge">35</span>
                </a>
                <div class="dropdown-menu dropdown-menu-right dropdown-lg">

                    <!-- item-->
                    <div class="dropdown-item noti-title">
                        <h5 class="m-0">
                                    <span class="float-right">
                                        <a href="" class="text-dark">
                                            <small>Clear All</small>
                                        </a>
                                    </span>Notification
                        </h5>
                    </div>

                    <div class="slimscroll noti-scroll">

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item">
                            <div class="notify-icon bg-info"><i class="mdi mdi-cloud-upload-outline"></i></div>
                            <p class="notify-details">Your upload has been approved
                                <small class="text-muted">5 hours ago</small>
                            </p>
                        </a>

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item active">
                            <div class="notify-icon bg-success"><i class="mdi mdi-map-marker-check"></i></div>
                            <p class="notify-details">You added your Location
                                <small class="text-muted">Just Now</small>
                            </p>
                        </a>

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item">
                            <div class="notify-icon bg-primary"><i class="mdi mdi-layers-remove"></i></div>
                            <p class="notify-details">Your item is shipped
                                <small class="text-muted">It is a long established fact that a reader will</small>
                            </p>
                        </a>

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item">
                            <div class="notify-icon bg-purple"><i class="mdi mdi-check-bold"></i></div>
                            <p class="notify-details">Your order is placed
                                <small class="text-muted">Dummy text of the printing and typesetting industry.</small>
                            </p>
                        </a>

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item">
                            <div class="notify-icon bg-warning">
                                <i class="mdi mdi-alert-outline"></i>
                            </div>
                            <p class="notify-details">Your Subscription Expired
                                <small class="text-muted">1 days ago</small>
                            </p>
                        </a>

                        <!-- item-->
                        <a href="javascript:void(0);" class="dropdown-item notify-item">
                            <div class="notify-icon bg-danger">
                                <i class="mdi mdi-settings"></i>
                            </div>
                            <p class="notify-details"><b>Devid</b>, You changed your Settings
                                <small class="text-muted">5 days ago</small>
                            </p>
                        </a>
                    </div>

                    <!-- All-->
                    <a href="javascript:void(0);" class="dropdown-item text-center text-primary notify-item notify-all">
                        View all
                        <i class="fi-arrow-right"></i>
                    </a>

                </div>
            </li>

            <li class="dropdown notification-list">
                <a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown"
                   href="#" role="button" aria-haspopup="false" aria-expanded="false">
                    <img src="images/users/avatar-1.jpg" alt="user-image" class="rounded-circle">
                    <span class="pro-user-name ml-1" id="name">
                                <i class="mdi mdi-chevron-down"></i>
                            </span>
                </a>
                <div class="dropdown-menu dropdown-menu-right profile-dropdown ">
                    <!-- item-->
                    <div class="dropdown-item noti-title">
                        <h6 class="m-0" id="name1">

                        </h6>
                    </div>

                    <!-- item-->
                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                        <i class="dripicons-user"></i>
                        <span>我的信息</span>
                    </a>

                    <!-- item-->
                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                        <i class="dripicons-card"></i>
                        <span>My Wallet</span>
                    </a>

                    <!-- item-->
                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                        <i class="dripicons-gear"></i>
                        <span>设置信息</span>
                    </a>

                    <div class="dropdown-divider"></div>

                    <!-- item-->
                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                        <i class="dripicons-power"></i>
                        <span onclick="tuichu(this)">退出登录</span>
                    </a>

                </div>
            </li>

        </ul>

        <ul class="list-unstyled menu-left mb-0">
            <li class="float-left">
                <a href="index.html" class="logo">
                            <span class="logo-lg">
                                <img src="assets/images/logo.png" alt="" height="35"></span>
                    <span class="logo-sm">
                                <img src="assets/images/logo.png" alt="" height="34">
                            </span>
                </a>
            </li>
            <li class="float-left">
                <a class="button-menu-mobile navbar-toggle">
                    <div class="lines">
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                </a>
            </li>
            <li class="app-search d-none d-md-block">
                <form class="form-inline">
                    <input type="text" class="form-control" placeholder="请输入用户姓名" id="sousuo">
                    <button class="btn btn-primary-color" type="submit" onclick="sousuo1(this)"><i
                            class="fa fa-search"></i></button>
                </form>
            </li>
        </ul>
    </div>
    <!-- end Topbar -->

    <div class="left-side-menu">

        <div class="slimscroll-menu">

            <!--- Sidemenu -->
            <div id="sidebar-menu">

                <ul class="metismenu" id="side-menu">


                    <div class="left-user">
                        <div class="user-box">
                            <div class="user-img">
                                <img src="images/users/avatar-1.jpg" alt="user-img" title="Mat Helme"
                                     class="rounded-circle img-fluid">
                                <a href="javascript:void(0);" class="user-edit"><i class="mdi mdi-pencil"></i></a>
                            </div>

                            <h5><a href="javascript: void(0);">欢迎您</a></h5>
                            <p class="text-muted mb-0">
                                <small id="admin"></small>
                            </p>
                        </div>
                    </div>

                    <li>
                        <a href="index.html">
                            <i class="dripicons-device-desktop"></i>
                            <span>系统分析</span>
                        </a>
                    </li>

                    <li>
                        <a href="javascript: void(0);">
                            <i class="dripicons-view-apps"></i>
                            <span> 界面布局 </span>
                            <span class="menu-arrow"></span>
                        </a>
                        <ul class="nav-second-level" aria-expanded="false">
                            <li>
                                <a href="layouts-dark-header.html">深色标题</a>
                            </li>
                            <li>
                                <a href="layouts-sidebar-collapsed.html">搜索侧栏</a>
                            </li>
                            <li>
                                <a href="layouts-dark-sidebar.html">深色侧栏</a>
                            </li>
                            <li>
                                <a href="layouts-small-sidebar.html">小型侧栏</a>
                            </li>
                            <li>
                                <a href="layouts-boxed.html">方框布局</a>
                            </li>
                        </ul>
                    </li>

                    <li>
                        <a href="tables-datatable.html">
                            <i class="dripicons-calendar"></i> <span> 医生信息 </span><span class="menu-arrow"></span>
                        </a>
                    </li>

                    <li>
                        <a href="Customer-datatable.html">
                            <i class="dripicons-briefcase"></i>
                            <span> 客户信息 </span>
                            <span class="menu-arrow"></span>
                        </a>
                    </li>
                    <li>
                        <a href="Pets-datatable.html">
                            <i class="dripicons-graph-pie"></i>
                            <span> 宠物管理</span>
                            <span class="menu-arrow"></span>
                        </a>
                    </li>
                    <li>
                        <a href="HistoryRecord-datatable.html">
                            <i class="dripicons-document"></i>
                            <span> 浏览管理 </span>
                            <span class="menu-arrow"></span>
                        </a>
                    </li>
                    <li>
                        <a href="Diagnosis-datatable.html">
                            <i class="dripicons-document"></i>
                            <span> 诊断管理 </span>
                            <span class="menu-arrow"></span>
                        </a>
                    </li>
                    -----------------------------------------------
                    <li>
                        <a href="Administrators-datatable.html">
                            <i class="dripicons-document"></i>
                            <span> 医生管理 </span>
                            <span class="menu-arrow"></span>
                        </a>
                    </li>
                    <li>
                        <a href="User-datatable.html">
                            <i class="dripicons-document"></i>
                            <span> 用户管理 </span>
                            <span class="menu-arrow"></span>
                        </a>
                    </li>
                </ul>

            </div>
            <!-- End Sidebar -->

            <div class="clearfix"></div>

        </div>
        <!-- Sidebar -left -->

    </div>
    <!-- Left Sidebar End -->

    <!-- ============================================================== -->
    <!-- Start Page Content here -->
    <!-- ============================================================== -->

    <div class="content-page">
        <div class="content">

            <!-- Start Content-->
            <div class="container-fluid">

                <!-- start page title -->
                <div class="row">
                    <div class="col-12">
                        <div class="page-title-box">
                            <div class="page-title-right">
                                <ol class="breadcrumb m-0">
                                    <li class="breadcrumb-item"><a href="javascript: void(0);">宠物信息</a></li>
                                    <li class="breadcrumb-item"><a href="javascript: void(0);">信息界面</a></li>
                                </ol>
                            </div>
                            <h4 class="page-title">宠物信息</h4>
                        </div>
                    </div>
                </div>
                <!-- end page title -->

                <div class="row">
                    <div class="col-12">
                        <div class="card-box">
                            <h4 class="header-title">信息界面</h4>
                            <p class="sub-header">
                                请谨慎操作！！注意宠物信息
                            </p>
                            <p>
                                <select id="selected">
                                    <option selected="selected">20</option>
                                    <option>50</option>
                                    <option>100</option>
                                </select>
                                <img src="assets/添加.jpg" height="25" id="btn1" width="25">
                                <img src="assets/首页.jpg" height="25" id="btn2" width="25">
                            </p>
                            <table id="datatable" class="table table-bordered dt-responsive nowrap">
                                <tr>
                                    <th>宠物编号</th>
                                    <th>宠物图片</th>
                                    <th>宠物名称</th>
                                    <th>宠物性别</th>
                                    <th>宠物种类</th>
                                    <th>宠物年龄</th>
                                    <th>宠物病症</th>
                                    <th>登记时间</th>
                                    <th>操    作</th>
                                </tr>

                                <tbody id="sbody">

                                </tbody>
                            </table>
                        </div> <!-- end card-box -->
                    </div> <!-- end col -->
                </div> <!-- end row -->
            </div> <!-- container-fluid -->
        </div> <!-- content -->
        <!-- Footer Start -->
        <footer class="footer">
            <div id="eeeee">

            </div>
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-12 text-center">
                        2020 © Dashboard Theme By <a href="index.html">Forest</a>
                    </div>
                </div>
            </div>
        </footer>
        <!-- end Footer -->
<input id="forest_Customer_ID" type="hidden" name="forest_Customer_ID">
    </div>
</div>
<!-- ============================================================== -->
<!-- End Page content -->
<!-- ============================================================== -->





<div id="pop" class="pop">
    <div class="title" id="title">
        <ul class="addUL">
            <li class="addLI">身份证号：</li>
            <li><input type="text" name="forest_Customer_Card" id="forest_Customer_Card" placeholder="请输入身份证号"/> <label
                    class="xrequired" id="requires_3"></label></li>
        </ul>
        <ul class="addUL">
            <li class="addLI">宠物名称：</li>
            <li><input type="text" name="forest_Pets_Name" id="forest_Pets_Name" placeholder="请输入宠物名称"/> <label
                    class="xrequired" ></label></li>
        </ul>
        <ul class="addUL">
            <li class="addLI">宠物性别：</li>
            <li><select id="forest_Pets_Sex">
                <option value="公" selected="selected">公</option>
                <option value="母">母</option>
            </select><label class="xrequired" id="requires_2"></label></li>
        </ul>
        <ul class="addUL">
            <li class="addLI">宠物种类：</li>
            <li><input type="text" name="forest_Pets_Type" id="forest_Pets_Type" placeholder="请输入宠物种类"/><label class="xrequired"id="requires_1"></label>
            </li>
        </ul>
        <ul class="addUL">
            <li class="addLI">宠物年龄：</li>
            <li><input type="text" name="forest_Pets_Age" id="forest_Pets_Age" placeholder="请输入宠物年龄"/>
                <label class="xrequired" id="requires_4"></label></li>
        </ul>
        <ul class="addUL">
            <li class="addLI">宠物病症：</li>
            <li><input type="text" name="forest_Pets_Disease" id="forest_Pets_Disease" placeholder="请输入宠物病症"/>
                <label class="xrequired" id="requires_5"></label></li>
        </ul>
    </div>
    <div class="btn" id="btn-left" onclick="addYeZhu(this)">确定</div>
    <div class="btn" id="btn-right" onclick="cancel(this)">取消</div>
</div>

<div id="pop1" class="pop" >
    <div class="title" id="title1">
        <ul class="addUL">
            <li class="addLI">宠物名称：</li>
            <li><input type="text" name="forest_Pets_Name" id="forest_Pets_Name1"/> <label class="xrequired" id="requires_6"></label></li>
        </ul>
        <ul class="addUL">
            <li class="addLI">宠物性别：</li>
            <li><select id="forest_Pets_Sex1">
                <option value="公" selected="selected">公</option>
                <option value="母">母</option>
            </select><label class="xrequired" id="requires_8"></label></li>
        </ul>
        <ul class="addUL">
            <li class="addLI">宠物种类：</li>
            <li><input type="text" name="forest_Pets_Type" id="forest_Pets_Type1"/><label class="xrequired"
                                                                                                              id="requires_7"></label>
            </li>
        </ul>
        <ul class="addUL">
            <li class="addLI">宠物年龄：</li>
            <li><input type="text" name="forest_Pets_Age" id="forest_Pets_Age1"/>
                <label class="xrequired" id="requires_10"></label></li>
        </ul>
        <ul class="addUL">
            <li class="addLI">宠物病症：</li>
            <li><input type="text" name="forest_Pets_Disease" id="forest_Pets_Disease1"/>
                <label class="xrequired" id="requires_9"></label></li>
        </ul>
    </div>
    <input type="hidden" name="forest_Pets_ID" id="forest_Pets_ID" />
    <div class="btn" id="btn-left1" onclick="updateYeZhu(this)">确定</div>
    <div class="btn" id="btn-right2" onclick="cancel1(this)">取消</div>
</div>



<div id="choiceWindow">
    <label id="x" style="position: absolute;top:2px;left: 95%;font-size: 25px;">x</label>
    <form enctype="multipart/form-data" id="fileUploadForm" method="post">
        <input type="file" id="file" name="file">
        <input type="text" id="test" disabled="disabled" style=display:none>
        <div class="mt-3">
            <button type="button" id="uploadbtn" name="uploadbtn" class="btn btn-primary">
                提交
            </button>
        </div>
    </form>
</div>
<div id="backGround"></div>



<div id="pop2" class="pop2">
    <div class="title1" id="title2">
        <ul class="addUL1" id="tops">
            <li class="addLI1">动物照片：</li>
            <li id="forest_Pets_Photo2"></li>
        </ul>
        <ul class="addUL1">
            <li class="addLI1" >客户姓名：</li>
            <li id="forest_Customer_Name2"></li>
        </ul>
        <ul class="addUL1">
            <li class="addLI1" >客户性别：</li>
            <li id="forest_Customer_Sex2"></li>
        </ul>
        <ul class="addUL1">
            <li class="addLI1">手机号码：</li>
            <li id="forest_Customer_Phone2"></li>
        </ul>
        <ul class="addUL1">
            <li class="addLI1">电子邮件：</li>
            <li id="forest_Customer_Email2"></li>
        </ul>
        <ul class="addUL1">
            <li class="addLI1">家庭地址：</li>
            <li id="forest_Customer_Home2"></li>
        </ul>
        <ul class="addUL1">
            <li class="addLI1">动物名称：</li>
            <li id="forest_Pets_Name2"></li>
        </ul>
    </div>
    <div class="btn1" id="btn-rightd" onclick="cancel22(this)">取消</div>
</div>
<div id="container11"></div>
<!-- END wrapper -->

<!-- Vendor js -->
<script src="js/vendor.min.js"></script>

<!-- datatable js -->
<script src="libs/datatables/jquery.dataTables.min.js"></script>
<script src="libs/datatables/dataTables.bootstrap4.min.js"></script>
<script src="libs/datatables/dataTables.responsive.min.js"></script>
<script src="libs/datatables/responsive.bootstrap4.min.js"></script>

<script src="libs/datatables/dataTables.buttons.min.js"></script>
<script src="libs/datatables/buttons.bootstrap4.min.js"></script>
<script src="libs/datatables/buttons.html5.min.js"></script>
<script src="libs/datatables/buttons.flash.min.js"></script>
<script src="libs/datatables/buttons.print.min.js"></script>

<script src="libs/datatables/dataTables.keyTable.min.js"></script>
<script src="libs/datatables/dataTables.select.min.js"></script>

<!-- Datatables init -->
<script src="js/pages/datatables.init.js"></script>

<!-- App js -->
<script src="js/app.min.js"></script>
<script src="js/pop.js"></script>
<script src="js/pop2.js"></script>
<div id="container"></div>
</body>
<script type="text/javascript"
        src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/10.4.0/sweetalert2.min.js "></script>

<script type="text/javascript">
    function detail(id){
        var data = {
            "forest_Pets_ID": id
        };
        $.ajax({
            url: "ForestCustomerPetsEntitySearchPetsAll",
            type: "POST",
            dataType: "json",
            contentType: 'application/json;charset=utf-8',
            data: JSON.stringify(data),
            success: function (data) {
                if (data.code == 200) {
                    var image=data.customerPet[0].pet.forest_Pets_Photo;
                    var imgObj = $("<img width='200' height='200'>").attr("src","upload/"+image);
                    //添加到画面上的UL标签里
                    $("#forest_Pets_Photo2").append(imgObj);
                    $("#forest_Customer_Name2").html(data.customerPet[0].customer.forest_Customer_Name);
                    $("#forest_Customer_Sex2").html(data.customerPet[0].customer.forest_Customer_Sex);
                    $("#forest_Customer_Phone2").html(data.customerPet[0].customer.forest_Customer_Phone);
                    $("#forest_Customer_Email2").html(data.customerPet[0].customer.forest_Customer_Email);
                    $("#forest_Customer_Home2").html(data.customerPet[0].customer.forest_Customer_Home);
                    $("#forest_Pets_Name2").append("<p> 名称："+data.customerPet[0].pet.forest_Pets_Name+"、种类："+data.customerPet[0].pet.forest_Pets_Type+"</>");
                    openPop("#container11", "#pop2", 800, 800);
                }else{
                    Swal.fire("提示", "不存在数据", "error");
                }
            }
        })
    }
    //详情取消
    function cancel22() {
        $("#container11").hide();
        $("#forest_Pets_Name2 p").remove();
        $("#forest_Pets_Photo2 img").remove();
        $("#pop2").hide();
    }



    $("#x").click(function () {
        $("#choiceWindow").slideUp(300);
        $("#backGround").hide();
    });

    $("#uploadbtn").click(function (json) {
        var formData = new FormData(document.getElementById("fileUploadForm"));
        var Forest_Pets_ID = $("#test").val();
        formData.append("Forest_Pets_ID", Forest_Pets_ID)
        $.ajax({
            url: 'upload',
            type: 'POST',
            data: formData,
            contentType: false,
            async: false,
            cache: false,
            processData: false,
            success: function (data) {
                if (data.result + "" == "true") {
                    alert("文件提交成功");
                    $("#choiceWindow").slideUp(300);
                    $("#backGround").hide();
                    loadstu();
                    $.getJSON("hcontroller/addmiddletable", {uid: uid, hid: hid}, function (json) {
                        console.log(json);
                    });
                } else if (data.result + "" == "false") {
                    alert("文件提交失败");
                }
            },
            error: function (data) {
                console.log(data)
                if (data.result + "" == "false") {
                    alert("文件提交失败");
                }
            }
        });
    });



    //身份证验证
    var flas4 = false;
    $("#forest_Customer_Card").blur(function () {
        var sfz = $("#forest_Customer_Card").val(); //
        //判断是身份证正则表达式
        var aa = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
        if (sfz == null || sfz == "") {
            $("#requires_3").empty();
            $("#forest_Customer_Card").val("");
            flas4 = false;

        } else if (!aa.test(sfz) || sfz.length != 18) {
            $("#requires_3").empty();
            $("#forest_Customer_Card").val("");
            flas4 = false;
        } else {
            $("#requires_3").empty();
            findUsrCredit();
            flas4 = true;
            return;
        }

    });
    //上传图片
    function updates(oid) {
        $("#choiceWindow").slideDown(300);
        $("#backGround").show();
        $("#test").val(oid)
    }
    //加载业主信息
    function loadstu() {
        var data = {
            "size": $("#selected").val(),
            "num": 0
        };
        $.ajax({
            url: "ForestPetsEntitySelect",
            type: "POST",
            dataType: "json",
            contentType: 'application/json;charset=utf-8',
            data: JSON.stringify(data),
            success: function (data) {
                if (data.code == 500) {
                    window.location.href = userUrl+"/Forest_Login.html";
                } else {
                    var str1 = null;
                    for (var i = 0; i < data.num; i++) {
                        str1 += "<input type='button' value=" + (i + 1) + " onclick='dos(" + i + ",this)'>";
                    }
                    var str = null;
                    for (var i = 0; i < data.Pets.length; i++) {
                        str += "<tr>";
                        str += "<td>" + (i + 1) + "</td>";
                        str += "<td id='www'> <img src='upload/" + data.Pets[i].forest_Pets_Photo + "'  width='30px' height='20px'/></td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Name + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Sex + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Type + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Age + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Disease + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Time + "</td>";
                        str += "<td class=\"text-center\"><a href=\"javascript:void(0);\"  onclick='updates(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-info btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Edit\"><i>上传</i></a><a href=\"javascript:void(0);\" onclick='petUpdate(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-danger btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Delete\"><i>更改</i></a><a href=\"javascript:void(0);\"  onclick='detail(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-info btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Edit\"><i>详情</i></a></td>";
                        str += "</tr>";
                    }
                }
                $("#sbody").empty();
                $("#sbody").append(str);
                $("#eeeee").html(str1);
                $("#name").html(data.name);
                $("#name1").html(data.name);
                $("#admin").html(data.name);
                $("tbody tr:nth-child(odd)").css("background","#CCF");    //奇偶行变色
            }
        });
    }
    //分页查询
    function dos(id) {
        var data = {
            "size": $("#selected").val(),
            "num": id
        };
        $.ajax({
            url: "ForestPetsEntitySelect",
            type: "POST",
            dataType: "json",
            contentType: 'application/json;charset=utf-8',
            data: JSON.stringify(data),
            success: function (data) {
                if (data.code == 500) {
                    window.location.href = userUrl+"/Forest_Login.html";
                } else {
                    var str1 = null;
                    for (var i = 0; i < data.num; i++) {
                        str1 += "<input type='button' value=" + (i + 1) + " onclick='dos(" + i + ",this)'>";
                    }
                    var str = null;
                    for (var i = 0; i < data.Pets.length; i++) {
                        str += "<tr>";
                        str += "<td>" + (i + 1) + "</td>";
                        str += "<td id='www'> <img src='upload/" + data.Pets[i].forest_Pets_Photo + "'  width='30px' height='20px'/></td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Name + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Sex + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Type + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Age + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Disease + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Time + "</td>";
                        str += "<td class=\"text-center\"><a href=\"javascript:void(0);\"  onclick='updates(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-info btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Edit\"><i>上传</i></a><a href=\"javascript:void(0);\" onclick='petUpdate(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-danger btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Delete\"><i>更改</i></a><a href=\"javascript:void(0);\"  onclick='detail(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-info btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Edit\"><i>详情</i></a></td>";
                        str += "</tr>";
                    }
                }
                $("#sbody").empty();
                $("#sbody").append(str);
                $("#eeeee").html(str1);
                $("#name").html(data.name);
                $("#name1").html(data.name);
                $("#admin").html(data.name);
                $("tbody tr:nth-child(odd)").css("background","#CCF");    //奇偶行变色
            }
        });
    }
    //当更改数据时
    $("#selected").blur(function () {
        loadstu();
    });
    //新增之前
    $("#btn1").click(function () {
        $("#forest_Pets_Name").val("");
        $("#forest_Pets_Age").val("");
        $("#forest_Pets_Disease").val("");
        $("#forest_Pets_Type").val("");
        openPop("#container", "#pop", 400, 600);
    });
    //首页
    $("#btn2").click(function () {
        loadstu();
    });

    //新增客户数据
    function addYeZhu() {
        var forest_Pets_Name = $("#forest_Pets_Name").val();
        var forest_Pets_Sex = $("#forest_Pets_Sex").val();
        var forest_Pets_Type = $("#forest_Pets_Type").val();
        var forest_Pets_Age = $("#forest_Pets_Age").val();
        var forest_Pets_Disease = $("#forest_Pets_Disease").val();
        var forest_Customer_ID=$("#forest_Customer_ID").val();
        swal.fire({
            type: 'warning', // 弹框类型
            title: '提示', //标题
            text: "请确认是否确认登记", //显示内容
            confirmButtonColor: '#3085d6',// 确定按钮的 颜色
            confirmButtonText: '确定',// 确定按钮的 文字
            showCancelButton: true, // 是否显示取消按钮
            cancelButtonColor: '#d33', // 取消按钮的 颜色
            cancelButtonText: "取消", // 取消按钮的 文字
            focusCancel: true, // 是否聚焦 取消按钮
            reverseButtons: true  // 是否 反转 两个按钮的位置 默认是  左边 确定  右边 取消
        }).then(function (isConfirm) {
            if (isConfirm.value) {
                var data = {
                    "forest_Pets_Name": forest_Pets_Name,
                    "forest_Pets_Sex": forest_Pets_Sex,
                    "forest_Pets_Type": forest_Pets_Type,
                    "forest_Pets_Age": forest_Pets_Age,
                    "forest_Pets_Disease": forest_Pets_Disease,
                    "forest_Customer_ID":forest_Customer_ID
                };
                if (forest_Pets_Name!="" && forest_Pets_Sex!="" && forest_Pets_Type!="" && forest_Pets_Age!="" && forest_Pets_Disease != "") {
                    $.ajax({
                        url: "ForestPetsEntityRegister",
                        type: "POST",
                        dataType: "json",
                        contentType: 'application/json;charset=utf-8',
                        data: JSON.stringify(data),
                        async: true,
                        success: function (data) {
                            if (data.code == 200) {
                                Swal.fire("提示", "登记成功", "success");
                                $("#container").hide();
                                $("#pop").hide();
                                loadstu();
                            } else {
                                Swal.fire("警告", "登记失败", "question");
                            }
                        }
                    });
                } else {
                    Swal.fire("提示", "输入数据有误", "question");
                }
            } else {
                Swal.fire("取消", "取消登记", "error");
            }
        })
    }
    //增加取消
    function cancel() {
        $("#container").hide();
        $("#pop").hide();
    }

    //修改取消
    function cancel1() {
        $("#container").hide();
        $("#pop1").hide();
    }

    //修改之前
    function petUpdate(forest_Pets_ID, ob) {
        var data = {
            "forest_Pets_ID": forest_Pets_ID
        };
        $.ajax({
            url: "ForestPetsEntityID",
            type: "POST",
            dataType: "json",
            contentType: 'application/json;charset=utf-8',
            data: JSON.stringify(data),
            success: function (data) {
                if (data.code == 200) {
                    $("#forest_Pets_Name1").val(data.Pets[0].forest_Pets_Name);
                    $("#forest_Pets_Sex1").val(data.Pets[0].forest_Pets_Sex);
                    $("#forest_Pets_Type1").val(data.Pets[0].forest_Pets_Type);
                    $("#forest_Pets_Age1").val(data.Pets[0].forest_Pets_Age);
                    $("#forest_Pets_Disease1").val(data.Pets[0].forest_Pets_Disease);
                    $("#forest_Pets_ID").val(data.Pets[0].forest_Pets_ID);
                    openPop("#container", "#pop1", 400, 600);
                }
            }
        })
    }

    //修改客户信息
    function updateYeZhu() {
        var forest_Pets_Name = $("#forest_Pets_Name1").val();
        var forest_Pets_Sex = $("#forest_Pets_Sex1").val();
        var forest_Pets_Type = $("#forest_Pets_Type1").val();
        var forest_Pets_Age = $("#forest_Pets_Age1").val();
        var forest_Pets_Disease = $("#forest_Pets_Disease1").val();
        var forest_Pets_ID=$("#forest_Pets_ID").val();
        swal.fire({
            type: 'warning', // 弹框类型
            title: '提示', //标题
            text: "请确认是否确认登记", //显示内容
            confirmButtonColor: '#3085d6',// 确定按钮的 颜色
            confirmButtonText: '确定',// 确定按钮的 文字
            showCancelButton: true, // 是否显示取消按钮
            cancelButtonColor: '#d33', // 取消按钮的 颜色
            cancelButtonText: "取消", // 取消按钮的 文字
            focusCancel: true, // 是否聚焦 取消按钮
            reverseButtons: true  // 是否 反转 两个按钮的位置 默认是  左边 确定  右边 取消
        }).then(function (isConfirm) {
            if (isConfirm.value) {
                var data = {
                    "forest_Pets_Name": forest_Pets_Name,
                    "forest_Pets_Sex": forest_Pets_Sex,
                    "forest_Pets_Type": forest_Pets_Type,
                    "forest_Pets_Age": forest_Pets_Age,
                    "forest_Pets_Disease": forest_Pets_Disease,
                    "forest_Pets_ID":forest_Pets_ID
                };
                if (forest_Pets_Name != "" && forest_Pets_Sex != "" && forest_Pets_Type != "" && forest_Pets_Age != "" && forest_Pets_Disease != "") {
                    $.ajax({
                        url: "ForestPetsEntityUpdateAll",
                        type: "POST",
                        dataType: "json",
                        contentType: 'application/json;charset=utf-8',
                        data: JSON.stringify(data),
                        success: function (data) {
                            if (data.code == 200) {
                                Swal.fire("提示", "编辑成功", "success");
                                $("#container").hide();
                                $("#pop1").hide();
                                loadstu();
                            } else {
                                Swal.fire("警告", "编辑失败", "question");
                            }
                        }
                    });
                } else {
                    Swal.fire("提示", "输入数据有误", "question");
                }
            } else {
                Swal.fire("取消", "取消登记", "error");
            }
        })
    }
    //搜索
    function sousuo1() {
        var data = {
            "forest_Pets_Name": $("#sousuo").val(),
            "size": $("#selected").val(),
            "num": 0
        };
        $.ajax({
            url: "ForestPetsEntitySearch",
            type: "POST",
            dataType: "json",
            contentType: 'application/json;charset=utf-8',
            data: JSON.stringify(data),
            success: function (data) {
                if (data.code == 500) {
                    window.location.href = userUrl+"/Forest_Login.html";
                } else {
                    var str1 = null;
                    for (var i = 0; i < data.num; i++) {
                        str1 += "<input type='button' value=" + (i + 1) + " onclick='sousuo(" + i + ",this)'>";
                    }
                    var str = null;
                    for (var i = 0; i < data.Pets.length; i++) {
                        str += "<tr>";
                        str += "<td>" + (i + 1) + "</td>";
                        str += "<td id='www'> <img src='upload/" + data.Pets[i].forest_Pets_Photo + "'  width='30px' height='20px'/></td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Name + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Sex + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Type + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Age + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Disease + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Time + "</td>";
                        str += "<td class=\"text-center\"><a href=\"javascript:void(0);\"  onclick='updates(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-info btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Edit\"><i>上传</i></a><a href=\"javascript:void(0);\" onclick='petUpdate(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-danger btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Delete\"><i>更改</i></a><a href=\"javascript:void(0);\"  onclick='detail(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-info btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Edit\"><i>详情</i></a></td>";
                        str += "</tr>";
                    }
                }
                $("#sbody").empty();
                $("#sbody").append(str);
                $("#eeeee").html(str1);
            }
        });
    }
    //获取系统用户的身份证
    function findUsrCredit() {
        var forest_Customer_Card = $("#forest_Customer_Card").val();        //身份证号
        var data={
            "forest_Customer_Card":forest_Customer_Card
        };
        $.ajax({
            url: "ForestCustomerEntityDetails",
            type: "POST",
            dataType: "json",
            contentType: 'application/json;charset=utf-8',
            data: JSON.stringify(data),
            async: false,
            success: function (data) {
                if (data.code == 200) {
                    Swal.fire("提示", "请继续操作", "success");
                    $("#forest_Customer_ID").val(data.customer[0].forest_Customer_ID);
                }else{
                    Swal.fire("提示", "请检查输入数据", "question");
                    $("#forest_Customer_Card").val(" ");
                    $("#forest_Customer_ID").val("");
                }
            }
        });
    }
    //加载客户信息 1
    $("#sousuo").blur(function () {
        sousuo1();
    });
    //退出
    function tuichu() {
        $.ajax({
            url: "tuiChu",
            type: "POST",
            dataType: "json",
            contentType: 'application/json;charset=utf-8',
            success: function (data) {
                window.location.href = userUrl+"/Forest_Login.html";
            }
        });
    }
    //分页查询 1
    function sousuo(id) {
        var data = {
            "forest_Pets_Name": $("#sousuo").val(),
            "size": $("#selected").val(),
            "num": id
        };
        $.ajax({
            url: "ForestPetsEntitySearch",
            type: "POST",
            dataType: "json",
            contentType: 'application/json;charset=utf-8',
            data: JSON.stringify(data),
            success: function (data) {
                if (data.code == 500) {
                    window.location.href = userUrl+"/pages-login.html";
                } else {
                    var str1 = null;
                    for (var i = 0; i < data.num; i++) {
                        str1 += "<input type='button' value=" + (i + 1) + " onclick='sousuo(" + i + ",this)'>";
                    }
                    var str = null;
                    for (var i = 0; i < data.Pets.length; i++) {
                        str += "<tr>";
                        str += "<td>" + (i + 1) + "</td>";
                        str += "<td id='www'> <img src='upload/" + data.Pets[i].forest_Pets_Photo + "'  width='30px' height='20px'/></td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Name + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Sex + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Type + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Age + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Disease + "</td>";
                        str += "<td>" + data.Pets[i].forest_Pets_Time + "</td>";
                        str += "<td class=\"text-center\"><a href=\"javascript:void(0);\"  onclick='updates(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-info btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Edit\"><i>上传</i></a><a href=\"javascript:void(0);\" onclick='petUpdate(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-danger btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Delete\"><i>更改</i></a><a href=\"javascript:void(0);\"  onclick='detail(" + data.Pets[i].forest_Pets_ID + ",this)' class=\"badge-info btn-sm mg-y-5\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"Edit\"><i>详情</i></a></td>";
                        str += "</tr>";
                    }
                }
                $("#sbody").empty();
                $("#sbody").append(str);
                $("#eeeee").html(str1);
            }
        });
    }

    $(function () {
        //调用加载数据函数
        loadstu();

    });
</script>
</html>
